﻿using AutoMapper;
using BaBaoFan.Modifier.Model;
using BaBaoFan.Modifier.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace BaBaoFan.Modifier
{
    public class MapperConfigurationProfile : Profile
    {
        public MapperConfigurationProfile()
        {
            CreateMap<MillInfo, MillInfoDto>();
            CreateMap<IEnumerable<MillInfo>, IEnumerable<MillInfoDto>>();
            CreateMap<AlgorithmInfo, AlgorithmInfoViewModel>();

            CreateMap<PoolCoinCreateModel, PoolCoin>();
            CreateMap<PoolCoin, PoolCoinCreateModel>();

            CreateMap<NavigationInfoCreateOrUpdateViewModel, NavigationInfoEntity>();
            CreateMap<NavigationInfoEntity, NavigationInfoCreateOrUpdateViewModel>();

            CreateMap<AlgorithmInfoCreateOrUpdateViewModel, AlgorithmInfoEntity>();
            CreateMap<AlgorithmInfoEntity, AlgorithmInfoCreateOrUpdateViewModel>();

            CreateMap<CoinInfoCreareOrUpdateViewModel, CoinInfo>();
            CreateMap<CoinInfo, CoinInfoCreareOrUpdateViewModel>();

            CreateMap<PoolInfoCreateOrUpdateViewModel, PoolInfo>();
            CreateMap<PoolInfo, PoolInfoCreateOrUpdateViewModel>();

            CreateMap<NavigationRelationCreateOrUpdateViewModel, NavigationRelationEntity>();
            CreateMap<NavigationRelationEntity, NavigationRelationCreateOrUpdateViewModel>();
        }
    }
}
